package com.novax.ex.activity.infrastructure.mapper;

import com.novax.ex.common.base.BaseEntity;
import com.novax.ex.common.base.BaseMapper;
import com.novax.ex.common.util.PageUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description
 * @Author zhaolei
 * @Date 3/29/23 4:10 PM
 * @Version 1.0
 */
public interface MallPrizeMapper extends BaseMapper {

    /**
     * Description: 结果调整列表统计
     *
     * @return java.lang.Long
     * @author Deucalion@novax.email
     * @date 2023/4/12 14:56
     */
    Long countAdjustment(PageUtil pageInfo);

    /**
     * Description: 结果调整列表分页
     *
     * @return java.util.List<T>
     * @author Deucalion@novax.email
     * @date 2023/4/12 14:56
     */
    <T extends BaseEntity> List<T> selectAdjustmentPage(PageUtil pageInfo);

    /**
     * Description: 历史调整列表统计
     *
     * @return java.lang.Long
     * @author Deucalion@novax.email
     * @date 2023/4/3 11:01
     */
    Long countHistory(PageUtil pageInfo);

    /**
     * Description: 历史调整列表分页
     *
     * @return java.util.List<T>
     * @author Deucalion@novax.email
     * @date 2023/4/3 11:02
     */
    <T extends BaseEntity> List<T> selectHistoryPage(PageUtil pageInfo);

    /**
     * Description: 指定中奖人
     *
     * @return int
     * @author Deucalion@novax.email
     * @date 2023/4/3 15:02
     */
    int appoint(@Param("mallPrizeId") Long mallPrizeId, @Param("userId") Long userId);

    /**
     * Description: 不再指定
     *
     * @return void
     * @author Deucalion@novax.email
     * @date 2023/4/3 15:02
     */
    void cancelAppoint(@Param("mallPrizeId") Long mallPrizeId);
}
